﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ForumDB;

namespace Common.DataBase
{
	interface ForumPages
	{

//DONE:

		//**
		//GET concrete -- maybe needed
		public Query getPost(int concretePost);
		public Query getThread(int concreteThread);
		public Query getSubForum(int concreteSubForum);
		//Page getPage(Position p, int size, int pageNumber);
		//**


		//**
		//GET ALL POSTS OF THREAD, OR THREADS OF SUBFORUM OR SUBFORUMS
		public Query getAllSubForum(int size, int pageNumber);
		public Query getAllThread(int _subForumID, int size, int pageNumber);
		public Query getAllPost(int _threadID, int size, int pageNumber);
		//**


		//**
		//ADD
		void addPost(int _threadLocation, string title, string body, string clientID, DateTime time);
		void addThread(int _subForumLocation, string title, string body, string clientID, DateTime time);
		void addSubForum(string title, string moderator, DateTime time);
		//**


//END



		Boolean editPost(int p, string title, string body, string clientID, DateTime time);

		Boolean editThread(int p, string title, string body, string clientID, DateTime time);


		void removePost(int p);

		void removeThread(int p);

		void removeSubForum(int p);



		bool isModerator(int position, string moderator);

		bool isSubModerator(int position, string moderator);

		void addSubforumModerator(int position, string moderator);

		void removeModerator(int position, string moderator);

		string getPostOwners(int pos);

		string getThreadOwners(int pos);

		int getMessageCount(int subPos);

		int getUserMessageCount(int subPos, string userName);

		int getUserMessageCount(string userName);

		int getModeratorCount(int subPos);

		DateTime getMessageCreationTime(int p);

		DateTime getMessageeditedTime(int p);

		DateTime getLastMessageTime(int subPos, string userName);

		List<string> getPostedUsers(int p);

		string getThreadTitle(int p);

		string getPostTitle(int p);

		string getSubForumTitle(int p);

	}
}



/*
question:
 * 
 * 1) pageNumber - starting from 0 ? 


*/